/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

/* 表单样式 */
.task-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.task-form h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 15px;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 过滤器样式 */
.task-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #ecf0f1;
    color: #7f8c8d;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

/* 任务列表样式 */
.task-list {
    display: grid;
    gap: 15px;
}

.task-item {
    background-color: white;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.task-item.high {
    border-left-color: #e74c3c;
}

.task-item.medium {
    border-left-color: #f39c12;
}

.task-item.low {
    border-left-color: #2ecc71;
}

.task-item.completed {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.task-description {
    color: #7f8c8d;
    margin-bottom: 5px;
}

.task-meta {
    font-size: 0.85rem;
    color: #95a5a6;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-actions button {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-complete {
    background-color: #2ecc71;
}

.btn-complete:hover {
    background-color: #27ae60;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .task-item {
        flex-direction: column;
    }
    
    .task-actions {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
}